package com.lims.landInfo.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javacommon.base.*;

import cn.org.rapid_framework.util.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Entity
@Table(name = "LIMS_RealEstate")
public class RealEstate extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	// date formats
	public static final String FORMAT_LAND_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	/**
	 * objid db_column: OBJID
	 */
	private java.lang.String objid;
	/**
	 * sno db_column: sno
	 */
	private java.lang.Integer sno;
	/**
	 * landno db_column: landno
	 */
	private java.lang.String landno;
	/**
	 * areaAtd db_column: areaAtd
	 */
	private java.lang.Double areaAtd;
	/**
	 * areaStctAtd db_column: areaStctAtd
	 */
	private java.lang.Double areaStctAtd;
	/**
	 * landUseAtd db_column: landUseAtd
	 */
	private java.lang.String landUseAtd;
	/**
	 * oldAreaStctAtd db_column: oldAreaStctAtd
	 */
	private java.lang.Double oldAreaStctAtd;
	/**
	 * areaDlt db_column: areaDlt
	 */
	private java.lang.Double areaDlt;
	/**
	 * areaStctDlt db_column: areaStctDlt
	 */
	private java.lang.Double areaStctDlt;
	/**
	 * landUseDlt db_column: landUseDlt
	 */

	private java.lang.Double landUseDlt;
	/**
	 * oldAreaStctDlt db_column: oldAreaStctDlt
	 */
	private java.lang.Double oldAreaStctDlt;
	/**
	 * changeType db_column: changeType
	 */
	private java.lang.Integer changeType;
	/**
	 * oldno db_column: oldno
	 */
	private java.lang.String oldno;
	/**
	 * oldContent db_column: oldContent
	 */
	private java.lang.String oldContent;
	/**
	 * describe db_column: describe
	 */
	private java.lang.String describe;
	/**
	 * landDate db_column: landDate
	 */
	private java.util.Date landDate;
	/**
	 * createDate db_column: createDate
	 */
	private java.util.Date createDate;
	// columns END
	
	public RealEstate() {
	}

	public RealEstate(java.lang.String objid) {
		this.objid = objid;
	}

	public void setObjid(java.lang.String value) {
		this.objid = value;
	}

	@Id
	@GeneratedValue(generator = "custom-id")
	@GenericGenerator(name = "custom-id", strategy = "uuid")//unique = false, 
	@Column(name = "OBJID", nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getObjid() {
		return this.objid;
	}

	@Column(name = "sno", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSno() {
		return this.sno;
	}

	public void setSno(java.lang.Integer value) {
		this.sno = value;
	}

	@Column(name = "landno", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getLandno() {
		return this.landno;
	}

	public void setLandno(java.lang.String value) {
		this.landno = value;
	}

	@Column(name = "areaAtd", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getAreaAtd() {
		return this.areaAtd;
	}

	public void setAreaAtd(java.lang.Double value) {
		this.areaAtd = value;
	}

	@Column(name = "areaStctAtd", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getAreaStctAtd() {
		return this.areaStctAtd;
	}

	public void setAreaStctAtd(java.lang.Double value) {
		this.areaStctAtd = value;
	}

	@Column(name = "landUseAtd", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getLandUseAtd() {
		return this.landUseAtd;
	}

	public void setLandUseAtd(java.lang.String value) {
		this.landUseAtd = value;
	}

	@Column(name = "oldAreaStctAtd", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getOldAreaStctAtd() {
		return this.oldAreaStctAtd;
	}

	public void setOldAreaStctAtd(java.lang.Double value) {
		this.oldAreaStctAtd = value;
	}

	@Column(name = "areaDlt", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getAreaDlt() {
		return this.areaDlt;
	}

	public void setAreaDlt(java.lang.Double value) {
		this.areaDlt = value;
	}

	@Column(name = "areaStctDlt", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getAreaStctDlt() {
		return this.areaStctDlt;
	}

	public void setAreaStctDlt(java.lang.Double value) {
		this.areaStctDlt = value;
	}

	@Column(name = "landUseDlt", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getLandUseDlt() {
		return this.landUseDlt;
	}

	public void setLandUseDlt(java.lang.Double value) {
		this.landUseDlt = value;
	}

	@Column(name = "oldAreaStctDlt", unique = false, nullable = true, insertable = true, updatable = true, length = 53)
	public java.lang.Double getOldAreaStctDlt() {
		return this.oldAreaStctDlt;
	}

	public void setOldAreaStctDlt(java.lang.Double value) {
		this.oldAreaStctDlt = value;
	}

	@Column(name = "changeType", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getChangeType() {
		return this.changeType;
	}

	public void setChangeType(java.lang.Integer value) {
		this.changeType = value;
	}

	@Column(name = "oldno", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getOldno() {
		return this.oldno;
	}

	public void setOldno(java.lang.String value) {
		this.oldno = value;
	}

	@Column(name = "oldContent", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public java.lang.String getOldContent() {
		return this.oldContent;
	}

	public void setOldContent(java.lang.String value) {
		this.oldContent = value;
	}

	@Column(name = "describe", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getDescribe() {
		return this.describe;
	}

	public void setDescribe(java.lang.String value) {
		this.describe = value;
	}

	@Transient
	public String getLandDateString() {
		return DateConvertUtils.format(getLandDate(), FORMAT_LAND_DATE);
	}

	public void setLandDateString(String value) {
		setLandDate(DateConvertUtils.parse(value, FORMAT_LAND_DATE,
				java.util.Date.class));
	}

	@Column(name = "landDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getLandDate() {
		return this.landDate;
	}

	public void setLandDate(java.util.Date value) {
		this.landDate = value;
	}

	@Transient
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}

	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,
				java.util.Date.class));
	}

	@Column(name = "createDate", unique = false, nullable = true, insertable = true, updatable = true, length = 23)
	public java.util.Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("Objid", getObjid()).append("Sno", getSno()).append(
						"Landno", getLandno()).append("AreaAtd", getAreaAtd())
				.append("AreaStctAtd", getAreaStctAtd()).append("LandUseAtd",
						getLandUseAtd()).append("OldAreaStctAtd",
						getOldAreaStctAtd()).append("AreaDlt", getAreaDlt())
				.append("AreaStctDlt", getAreaStctDlt()).append("LandUseDlt",
						getLandUseDlt()).append("OldAreaStctDlt",
						getOldAreaStctDlt()).append("ChangeType",
						getChangeType()).append("Oldno", getOldno()).append(
						"OldContent", getOldContent()).append("Describe",
						getDescribe()).append("LandDate", getLandDate())
				.append("CreateDate", getCreateDate()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getObjid()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof RealEstate == false)
			return false;
		if (this == obj)
			return true;
		RealEstate other = (RealEstate) obj;
		return new EqualsBuilder().append(getObjid(), other.getObjid())
				.isEquals();
	}
}
